<?php
include "secretiki.php";
?>




<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="author" content="Roman Shangin">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title>Асик - сервисный центр</title>
    <!-- Fevicon -->
    <link rel="shortcut icon" href="assets/images/favicon.ico">
    <!-- Start css -->
    <!-- Switchery css -->
    <link href="index/assets/plugins/switchery/switchery.min.css" rel="stylesheet">
    <link href="index/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="index/assets/css/icons.css" rel="stylesheet" type="text/css">
    <link href="index/assets/css/flag-icon.min.css" rel="stylesheet" type="text/css">
    <link href="index/assets/css/style.css" rel="stylesheet" type="text/css">
    <!-- End css -->
</head>

<body data-page="cart" class="horizontal-layout">
    <!-- Start Containerbar -->
    <div id="containerbar" class="container-fluid">
        <!-- Start Rightbar -->
        <div class="rightbar">
            <!-- Start Topbar Mobile -->
            <div class="topbar-mobile">
                <div class="row align-items-center">
                    <div class="col-md-12">
                        <div class="mobile-logobar">
                            <a href="http://www.asic-irk.xyz/" class="mobile-logo"><img src="assets/images/logo.png" class="img-fluid" alt="logo"></a>
                        </div>
                        <div class="mobile-togglebar">
                            <ul class="list-inline mb-0">
                                <li class="list-inline-item">
                                    <div class="topbar-toggle-icon">
                                        <a class="topbar-toggle-hamburger" href="javascript:void();">
                                            <img src="assets/images/svg-icon/horizontal.svg" class="img-fluid menu-hamburger-horizontal" alt="horizontal">
                                            <img src="assets/images/svg-icon/verticle.svg" class="img-fluid menu-hamburger-vertical" alt="verticle">
                                         </a>
                                     </div>
                                </li>
                                <li class="list-inline-item">
                                    <div class="menubar">
                                        <a class="menu-hamburger navbar-toggle bg-transparent" href="javascript:void();" data-toggle="collapse" data-target="#navbar-menu" aria-expanded="true">
                                            <img src="assets/images/svg-icon/collapse.svg" class="img-fluid menu-hamburger-collapse" alt="collapse">
                                            <img src="assets/images/svg-icon/close.svg" class="img-fluid menu-hamburger-close" alt="close">
                                        </a>
                                     </div>
                                </li>                                
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Start Topbar -->
            <div class="topbar">
                <!-- Start container-fluid -->
                <div class="container-fluid">
                    <!-- Start row -->
                    <div class="row align-items-center">
                        <!-- Start col -->
                        <div class="col-md-12 align-self-center">
                            <div class="togglebar">
                                <ul class="list-inline mb-0">
                                    <li class="list-inline-item">
                                        <div style="padding-top: 12px;" class="logobar">
                                            <a href="http://www.asic-irk.xyz/" class="logo logo-large"><img src="assets/images/logo.png" class="img-fluid" alt="logo"></a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="infobar">
                                <ul class="list-inline mb-0">
                                    <li class="badge list-inline-item" id="total-cart-count" style="width: 0px;padding-right: 0px;">
                                    </li>
                                    <li class="list-inline-item">
                                        <div class="settingbar">
                                            <a href="cart"  class="infobar-icon">
                                                <img src="assets/images/svg-icon/ecommerce.svg" class="img-fluid" alt="settings">
                                            </a>
                                        </div>
                                    </li>
                                    
<style>
.rainbow-animated {
  background: linear-gradient(to right, red, orange, yellow, green, cyan, blue, violet);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-animation: rainbow 20s ease infinite;
  animation: rainbow 20s ease infinite;
  font-size: 14px;
  line-height: 25px;
}
 
@-webkit-keyframes rainbow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}
 
@keyframes rainbow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}


   .round {
   width: 141px; height: 28px; /* Ширина и высота */
   border-radius: 50%; /* Превращаем в круг */
   }

</style>       


                                    
                                    <li class="list-inline-item">
                                        <div class="profilebar">
                                            <div class="dropdown">
                                            <?php if(isset($_SESSION['logged_user'])) : ?>
                                              <a class="dropdown-toggle" href="#" role="button" id="profilelink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="<?php echo "assets/images/$obje->avatar_user"; ?>" class="round img-fluid" alt="profile"><span class="feather icon-chevron-down live-icon"></span></a>
                                              <?php else : ?>
                                              <a class="dropdown-toggle" href="#" role="button" id="profilelink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="<?php echo "assets/images/users/profile.svg"; ?>" class="round img-fluid" alt="profile"><span class="feather icon-chevron-down live-icon"></span></a>
                                              <?php endif; ?>
                                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="profilelink">
                                                    <div class="dropdown-item">
                                                        <div class="profilename">
                                        <?php if(isset($_SESSION['logged_user'])) : ?>
                                                 <?php	if ($role == 'Администратор') :?>
                                                          <h5 class="rainbow-animated">Администратор</h5>
                                                 <?php else : ?>
                                                        <?php	if ($role == 'Сотрудник') :?>
                                                        <h5>Сотрудник</h5>
                                                        <?php else : ?>
                                                        <h5><?php echo $_SESSION['logged_user']->name; ?></h5>
                                                        <?php endif; ?>
                                                 <?php endif; ?>
                                        <?php else : ?>
                                                          <h5>Гость</h5>
                                        <?php endif; ?>        
                                                 
                                                        </div>
                                                    </div>
                                                    <div class="userbox">
                                                        
                                        <?php if(isset($_SESSION['logged_user'])) : ?>
                                        
                                                        <ul class="list-unstyled mb-0">
                                                            <li class="media dropdown-item">
                                                                <a href="account" class="profile-icon"><img src="assets/images/svg-icon/user.svg" class="img-fluid" alt="user">Профиль</a>
                                                            </li>
                                                            <li class="media dropdown-item">
                                                                <a href="logout" class="profile-icon"><img src="assets/images/svg-icon/logout.svg" class="img-fluid" alt="logout">Выйти</a>
                                                            </li>
                                                        </ul>
                                        
                                        <?php else : ?>
                                        
                                                        <ul class="list-unstyled mb-0">
                                                            <li class="media dropdown-item">
                                                                <a href="login" class="profile-icon"><img src="assets/images/svg-icon/user.svg" class="img-fluid" alt="user">Войти</a>
                                                            </li>
                                                        </ul>
                                                        
                                        <?php endif; ?>
                                                        
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                                   
                                    </li>
                                    <li class="list-inline-item menubar-toggle">
                                        <div class="menubar">
                                            <a class="menu-hamburger navbar-toggle bg-transparent" href="javascript:void();" data-toggle="collapse" data-target="#navbar-menu" aria-expanded="true">
                                                <img src="assets/images/svg-icon/collapse.svg" class="img-fluid menu-hamburger-collapse" alt="collapse">
                                                <img src="assets/images/svg-icon/close.svg" class="img-fluid menu-hamburger-close" alt="close">
                                            </a>
                                         </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <!-- End col -->
                    </div> 
                    <!-- End row -->
                </div>
                <!-- End container-fluid -->
            </div>
            <!-- End Topbar -->
            <!-- Start Navigationbar -->
            <div class="navigationbar">
                <!-- Start container-fluid -->
                <div class="container-fluid">
                    <!-- Start Horizontal Nav -->
                    <nav class="horizontal-nav mobile-navbar fixed-navbar">
                        <div class="collapse navbar-collapse" id="navbar-menu">
                          <ul class="horizontal-menu">
                            <li>
                                <a href="http://www.asic-irk.xyz/"><img src="assets/images/svg-icon/dashboard.svg" class="img-fluid" alt="dashboard"><span>Главная</span></a>
                            </li>
                            <li>
                                <a href="shop"><img src="assets/images/svg-icon/components.svg" class="img-fluid" alt="components"><span>Магазин</span></a>
                            </li>
                            <li>
                                <a href="reviews"><img src="assets/images/svg-icon/apps.svg" class="img-fluid" alt="apps"><span>Отзывы</span></a>
                            </li>
                            <li>
                                <a href="about"><img src="assets/images/svg-icon/pages.svg" class="img-fluid" alt="pages"><span>Контакты</span></a>
                            </li>
                            <?php	if ($role == 'Администратор') :?>
                            <li>
                                <a href="/adm/index"><img src="assets/images/svg-icon/dashboard.svg" class="img-fluid" alt="dashboard"><span>Панель управления ИС</span></a>
                            </li>
                            <?php else : ?>
                            <?php endif; ?> 
                          </ul>
                        </div>
                    </nav>
                    <!-- End Horizontal Nav -->
                </div>
                <!-- End container-fluid -->
            </div>
            <!-- End Navigationbar -->
            <!-- Start Breadcrumbbar -->                    
            <div class="breadcrumbbar" style="padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;width: 0px;">
            </div>
            <!-- End Breadcrumbbar -->

            <!-- Start Contentbar -->    
            <div class="contentbar">                
                <!-- Start row -->
                <div class="row">
                    <!-- Start col -->
                    <div class="col-md-12 col-lg-12 col-xl-12">
                        <div class="card m-b-30">
                            <div class="card-body">
                                <div class="row justify-content-center">
                                    <div class="col-lg-12 col-xl-12">
                                        <div class="cart-container">
                                            <div class="cart-head">
                                                <div class="table-responsive">
                                                    
                                                    
              <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>Название</th>
                        <th>Цена</th>
                        <th>Количество</th>
                        <th>Сумма</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody id="cart">
                    <tr><td colspan="6"><img src="img/loading.gif" alt="" /></td></tr>
                </tbody>
            </table>
        </div>
        <div><b>Итого: </b><span id="total-cart-summa">65000</span> ₽</div>
        <br />
        <a class="btn btn-success-rgba my-1" href="checkout">Оформить заказ<i class="feather icon-arrow-right ml-2"></i></a>
    </div>

  <style>
   .point { cursor: pointer; }
  </style>

    <script id="cart-template" type="text/template">
        <% _.each(goods, function(good) { %>
            <tr class="cart-item js-cart-item" data-id="<%= good.id %>">
                <td><%- good.name %></td>
                <td><%= good.price %> ₽</td>
                <td>
                    <span 
                        class="point cart-item__btn-dec-count js-change-count" 
                        title="Уменьшить на 1" 
                        data-id="<%= good.id %>" 
                        data-delta="-1"
                    >-
                        <span class="glyphicon glyphicon-minus"></span>
                    </span>
                    <span class="js-count"><%= good.count %></span>
                    <span 
                        class="point cart-item__btn-inc-count js-change-count" 
                        title="Увеличить на 1" 
                        data-id="<%= good.id %>" 
                        data-delta="1"
                    >+
                        <span class="glyphicon glyphicon-plus"></span>
                    </span>
                </td>
                <td><span class="js-summa"><%= good.count * good.price %></span> ₽</td>
                <td>
                    <span class="point cart-item__btn-remove js-remove-from-cart" title="Удалить из корзины" data-id="<%= good.id %>">
                        <span class="feather icon-trash-2"></span>                                
                    </span>
                </td>
            </tr>
        <% }); %>
    </script>                                                  
                                                    
                                                    
                                                    
                                            </div>
                                            </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- End col -->
                </div>
                <!-- End row -->
            </div>
            <!-- End Contentbar -->
            <!-- Start Footerbar -->
            <div class="footerbar">
                <footer class="footer">
                    <p class="mb-0">© 2022 Асик - Все права защищены.</p>
                </footer>
            </div>
            <!-- End Footerbar -->
        </div>
        <!-- End Rightbar -->
    </div>
    <!-- End Containerbar -->
    <!-- Start js -->        
    <script src="index/assets/js/jquery.min.js"></script>
    <script src="index/assets/js/popper.min.js"></script>
    <script src="index/assets/js/bootstrap.min.js"></script>
    <script src="index/assets/js/modernizr.min.js"></script>
    <script src="index/assets/js/detect.js"></script>
    <script src="index/assets/js/jquery.slimscroll.js"></script>
    <script src="index/assets/js/horizontal-menu.js"></script>
    <!-- Switchery js -->
    <script src="index/assets/plugins/switchery/switchery.min.js"></script>
    <!-- Core js -->
    <script src="index/assets/js/core.js"></script>
    
        <script src="js/vendor/jquery.min.js" type="text/javascript"></script>
    <script src="js/vendor/jquery.cookie.js" type="text/javascript"></script>
    <script src="js/vendor/underscore.min.js" type="text/javascript"></script>
    <script src="js/modules/catalog.js" type="text/javascript"></script>
    <script src="js/modules/cart.js" type="text/javascript"></script>
    <script src="js/modules/compare.js" type="text/javascript"></script>
    <script src="js/modules/main.js" type="text/javascript"></script>
    <!-- End js -->
</body>
</html>

